<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function send(url){
        return new Promise((resolve, reject)=>{
            const xhr = new XMLHttpRequest();
            xhr.open('GET',url)
            xhr.send()
            xhr.onreadystatechange = ()=>{
                if (xhr.readyState === 4) {
                   if (xhr.status >=200 && xhr.status<300){
                       resolve(xhr.response)
                   }else {
                       reject(xhr.status)
                   }
                }
            }
        })
    }
    send('http://localhost:63342/study/js/promise/02_%E5%B0%81%E8%A3%85Ajax.html?_ijt=gp91efq0mrslkrdd49p5esql6&_ij_reload=RELOA1D_ON_SAVE').then((v)=>{
        console.log(v)
    }).catch(v=>{
        console.warn(v)
    })
</script>
</body>
</html>